#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.common.exception;

import ${package}.common.dto.ResultDto;
import lombok.Getter;

/**
 * @author TQC
 * @date 2020/2/10 13:22
 */

@Getter
public class BusinessException extends RuntimeException {

    /**
     * 错误代码
     */
    private int code = ResultDto.FAIL;

    private static final long serialVersionUID = -1580182964949691451L;

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public BusinessException(int code) {
        this.code = code;
    }

    public BusinessException(String message, int code) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message, int code, Throwable cause) {
        super(message, cause);
        this.code = code;
    }


}
